home *** CD-ROM | disk | FTP | other *** search
/ Software of the Month Club 2000 October / Software of the Month - Ultimate Collection Shareware 277.iso / pc / PROGRAMS / UTILITY / WINLINUX / DATA1.CAB / programs_-_include / LINUX / IPX.H < prev    next >
C/C++ Source or Header  |  1999-09-17  |  2KB  |  90 lines

  1. #ifndef _IPX_H_
  2. #define _IPX_H_
  3. #include <linux/sockios.h>
  4. #include <linux/socket.h>
  5. #define IPX_NODE_LEN    6
  6. #define IPX_MTU        576
  7.  
  8. struct sockaddr_ipx
  9. {
  10.     sa_family_t    sipx_family;
  11.     __u16        sipx_port;
  12.     __u32        sipx_network;
  13.     unsigned char     sipx_node[IPX_NODE_LEN];
  14.     __u8        sipx_type;
  15.     unsigned char    sipx_zero;    /* 16 byte fill */
  16. };
  17.  
  18. /*
  19.  *    So we can fit the extra info for SIOCSIFADDR into the address nicely
  20.  */
  21.  
  22. #define sipx_special    sipx_port
  23. #define sipx_action    sipx_zero
  24. #define IPX_DLTITF    0
  25. #define IPX_CRTITF    1
  26.  
  27. typedef struct ipx_route_definition
  28. {
  29.     __u32         ipx_network;
  30.     __u32         ipx_router_network;
  31.     unsigned char ipx_router_node[IPX_NODE_LEN];
  32. }    ipx_route_definition;
  33.  
  34. typedef struct ipx_interface_definition
  35. {
  36.     __u32         ipx_network;
  37.     unsigned char ipx_device[16];
  38.     unsigned char ipx_dlink_type;
  39. #define IPX_FRAME_NONE        0
  40. #define IPX_FRAME_SNAP        1
  41. #define IPX_FRAME_8022        2
  42. #define IPX_FRAME_ETHERII    3
  43. #define IPX_FRAME_8023        4
  44. #define IPX_FRAME_TR_8022       5 /* obsolete */
  45.     unsigned char ipx_special;
  46. #define IPX_SPECIAL_NONE    0
  47. #define IPX_PRIMARY        1
  48. #define IPX_INTERNAL        2
  49.     unsigned char ipx_node[IPX_NODE_LEN];
  50. }    ipx_interface_definition;
  51.     
  52. typedef struct ipx_config_data
  53. {
  54.     unsigned char    ipxcfg_auto_select_primary;
  55.     unsigned char    ipxcfg_auto_create_interfaces;
  56. }    ipx_config_data;
  57.  
  58. /*
  59.  * OLD Route Definition for backward compatibility.
  60.  */
  61.  
  62. struct ipx_route_def
  63. {
  64.     __u32         ipx_network;
  65.     __u32         ipx_router_network;
  66. #define IPX_ROUTE_NO_ROUTER    0
  67.     unsigned char ipx_router_node[IPX_NODE_LEN];
  68.     unsigned char ipx_device[16];
  69.     unsigned short ipx_flags;
  70. #define IPX_RT_SNAP        8
  71. #define IPX_RT_8022        4
  72. #define IPX_RT_BLUEBOOK        2
  73. #define IPX_RT_ROUTED        1
  74. };
  75.  
  76. #define SIOCAIPXITFCRT        (SIOCPROTOPRIVATE)
  77. #define SIOCAIPXPRISLT        (SIOCPROTOPRIVATE+1)
  78. #define SIOCIPXCFGDATA        (SIOCPROTOPRIVATE+2)
  79. #define SIOCIPXNCPCONN        (SIOCPROTOPRIVATE+3)
  80.  
  81. #ifdef __KERNEL__
  82. #include <linux/skbuff.h>
  83.  
  84. extern int ipxrtr_route_skb(struct sk_buff *);
  85. extern int ipx_if_offset(unsigned long ipx_net_number);
  86. extern void ipx_remove_socket(struct sock *sk);
  87. #endif /* def __KERNEL__ */
  88.  
  89. #endif /* def _IPX_H_ */
  90.